﻿<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>通过单击普通按钮隐藏和显示全部div元素</title>
<script type="text/javascript" src="../js/jquery-3.3.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$("input[type='button']").click(function(){
		$("div").toggle();    		//切换有所有div元素的显示状态
	});
}); 
</script>
</head>
<body>
<div>明日科技</div>
<div>明日图书</div>
<input type="button" value="切换状态"/>
</body>
</html>
